package org.springframework.security.core.authority.mapping;

import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * @author Dillon
 * @date 2024/7/11
 * @slogan 致敬大师 致敬未来的你
 * @desc 用户权限转换类，用于将权限转换为另一种权限 或者是自定义补充权限
 */
public interface GrantedAuthoritiesMapper {

	/**
	 * 权限映射
	 *
	 * @param authorities 映射前权限集合
	 * @return 映射后权限集合
	 */
	Collection<? extends GrantedAuthority> mapAuthorities(Collection<? extends GrantedAuthority> authorities);

}
